<style>
.content-group {background:#fff;border-radius: 0.5rem;margin-bottom:0.39rem}
.merchname {display:none}
.fui-tab-scroll .item a {color:#333;font-weight:400}
.fui-tab-scroll .item.on,.fui-tab-scroll .item.on a{color:#000;font-weight:400}
.fui-tab-scroll .item.on:before {height: 0;}
.fui-icon-group .fui-icon-col {
    margin: 0.1rem 0;
}
.carousel {margin-top:0}
.fui-header:after {
	border-bottom: 1px solid #333;
}
.fui-notice:after, .fui-notice:before  {
	border-bottom: 0 solid #D9D9D9;
	border-top: 0 solid #D9D9D9;
}
.bottombg {position: absolute;margin-top:-0.5rem;width:100%;height:0.5rem;border-top-right-radius:0.5rem;border-top-left-radius:0.5rem;}
.topbg {height:4rem;}
.topbg.nosearch{height:2rem;}
.search-input i {
    color: {{main.syscolor||'#b4b4b4'}};
}
.search-input input {
	border: 0 solid #b4b4b4;
}
.radius .jy-group {border-radius:0.5rem;margin:0.2rem 0.5rem}
body {background-image: url('../addons/jy_tiffany/resource/images/bg.jpg');}
</style>
<div ng-include="sys_html('common/_header','','','jy_weishop')"></div>
<div ng-if="pagedata.nodatapic_close" class="fui-page fui-page-current page-goods-list" style="background: none">
<div class='fui-content' style="top:0;background: none">
	<div style="position: relative;text-align:center;width:100%">
		<div class="fui-cell-group" style="margin-top:0;">
		<div class="fui-cell" style="background:none;padding:0 0.5rem">
			<div class="fui-cell-label" style="padding-top: 0.3rem;width:auto">
				<i class="icon icon-sousuo1" ng-click="access_json('jy_tiffany/goods.index/search/')" style="font-size: 0.8rem;margin-right:0.2rem"></i>
			</div>
			<div class="fui-cell-info" style="padding-top: 0.5rem;color:#333;text-align:center">
				<img style="height:1.2rem" ng-src="{{tomedia(pagedata.setting.toplogo) || '../addons/jy_tiffany/resource/images/logo.png'}}"/>
			</div>
			<div class="fui-cell-remark noremark" style="color:#333;">
				<i ng-click="access_json('jy_tiffany/shop.groups/')"  class="icon icon-viewlist" style="margin-right: 0.5rem;"></i>
				<i  ng-if="main.isapp!=1" class="icon icon-wo1" ng-click="access_json('jy_tiffany/member.index/')" style="font-size: 0.9rem;"></i>
			</div>
		</div>
		</div>
	</div>
	<div ng-if="!pagedata.isreadtips" class="fui-cellone" style="background-color: #81d8d0;">
		<div class="fui-cell-text">
			<p style="text-align: center;">
				{{pagedata.pluginset.tips || '摩登T时代，彰显风范，即刻购买 Tiffany T系列 11/3-11/30，线上订单金额满2万元尊享12期花呗免息。详询客服400xxx000。'}}
			</p>
		</div>
		<div class="remark noremark">
			<i ng-click="pagedata.isreadtips=true" class="icon icon-close" style="padding: 0.5rem"></i>
		</div>
	</div>
	<div ng-if="!pagedata.setting.ishdps" ng-include="sys_html('shop/_hdps','','','jy_tiffany')" style="padding:0;"></div>
	<div ng-if="pagedata.hot_list.length>0" class="fui-goods-group block" style="padding:0">
		<div class="fui-cell-scroll">
			<div ng-repeat="g in pagedata.hot_list" href="javascript:;" ng-click="access_json('/goods.detail//id='+g.id)" class="fui-goods-item item" style="float:none;position: relative;width:6rem;padding:0.2rem;margin:0;border-bottom: 0 solid #e7e7e7">
				<div class="image" style="height:3.5rem;position:relative;background-image: url('{{tomedia(g.image) ||'../addons/jy_merch/resource/images/nologo.png'}}')"></div>
			</div>
		</div>
	</div>
	<div ng-click="access_json(pagedata.pluginset.indexadurl)" style="margin-top:0.5rem;height:auto;width: 100%;">
		<img style="width: 100%;height:auto" ng-src="{{tomedia(pagedata.pluginset.indexad) ||'../addons/jy_tiffany/resource/images/ad01.jpg'}}"/>
	</div>
	<article class="content-tile">
		<div class="description" style="padding:24px">
			<div class="tiffany-rte"><p style="text-align: center;color:#000;font-size: 1rem"><span>热门臻礼</span></p>
			</div>
		</div>
	</article>
	<div class="fui-tab-scroll" style="padding-bottom:0;">
		<div ng-class="{'item':1,'on':pagedata.params.pid==0}" style="height:2rem;line-height:1.5rem"><a href="javascript:;" ng-click="pagedata.nowcategory={};pagedata.params.pid=0;pagedata.getgroupgoods()">推荐</a></div>
		<div ng-repeat="tab in pagedata.category" style="height:2rem;line-height:1.5rem" ng-class="{'item':1,'on':pagedata.params.pid==tab.id}"><a href="javascript:;" ng-click="pagedata.nowcategory=tab;pagedata.params.pid=tab.id;pagedata.params.cid=0;pagedata.groupkey=$index;pagedata.getgroupgoods()">{{tab.title}}</a></div>
	</div>
	<div style="height:auto;width: 100%;">
		<img style="width: 100%;height:auto" ng-src="{{tomedia(pagedata.nowcategory.image) ||'../addons/jy_tiffany/resource/images/group.png'}}"/>
	</div>
	<div ng-if="pagedata.groupgoods.length>0" class="fui-goods-group block" style="padding:0">
		<div class="fui-cell-scroll">
			<div ng-repeat="g in pagedata.groupgoods" href="javascript:;" ng-click="access_json('/goods.detail//id='+g.id)" class="fui-goods-item item" style="float:none;position: relative;width:6rem;padding:0.2rem;margin:0;border-bottom: 0 solid #e7e7e7">
				<div class="image" style="height:3.5rem;position:relative;background-image: url('{{tomedia(g.image) ||'../addons/jy_merch/resource/images/nologo.png'}}')"></div>
				<div class="detail" style="padding-left:0;background:none">
					<div class="name" style="font-size:0.6rem;color:#333">
						{{g.title}}
					</div>
					<div style="color:#333;margin-top: 0.3rem;font-size:0.7rem">
						￥{{g.active.price || g.price}}
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="content-empty" style="margin: 1rem 0">
		<a href="javascript:;" ng-click="access_json('/goods.index/')" class='btn btn-sm btn-default-o external' style="line-height:2.3;font-weight:400;background:#fff;border-radius: 2px;width: auto;font-size: .75rem">探索全部</a>
	</div>
	<div ng-click="access_json(pagedata.pluginset.indexad2url)" style="margin-top:0.5rem;height:auto;width: 100%;">
		<img style="width: 100%;height:auto" ng-src="{{tomedia(pagedata.pluginset.indexad2) ||'../addons/jy_tiffany/resource/images/ad02.jpg'}}"/>
	</div>
	<article class="content-tile">
		<div class="description" style="padding:24px">
			<div class="tiffany-rte"><p style="text-align: center;color:#000;font-size: 1rem"><span class="font-size-24">其他推荐</span></p>
			</div>
		</div>
	</article>
	<div style="height:auto;width: 100%;">
		<img style="width: 100%;height:auto" ng-src="{{tomedia(pagedata.nowcategory.image) ||'../addons/jy_tiffany/resource/images/group.png'}}"/>
	</div>
	<div ng-if="pagedata.list.length>0" class="fui-goods-group block" style="padding:0">
			<div ng-repeat="g in pagedata.list" href="javascript:;" ng-click="access_json('/goods.detail//id='+g.id)" class="fui-goods-item item" style="width:33.3%;padding:0.2rem;margin:0;border-bottom: 0 solid #e7e7e7">
				<div class="image" style="height:3.5rem;position:relative;background-image: url('{{tomedia(g.image) ||'../addons/jy_merch/resource/images/nologo.png'}}')"></div>
			</div>
	</div>
	<div ng-if="pagedata.loading" class='infinite-loading'><span class='fui-preloader'></span><span class='text'> 正在加载...</span></div>
	<div class="content-empty" style="margin: 1rem 0">
		<a href="javascript:;" ng-click="pagedata.loading=true;tool.get_list('jy_weishop/goods.index/getlist/num=9',true)" class='btn btn-sm btn-default-o external' style="line-height:2.3;font-weight:400;background:#fff;border-radius: 2px;width: auto;font-size: .75rem">换一换</a>
	</div>
	<div ng-click="access_json(pagedata.pluginset.indexad3url)" style="margin-top:0.5rem;height:auto;width: 100%;">
		<img style="width: 100%;height:auto" ng-src="{{tomedia(pagedata.pluginset.indexad3) ||'../addons/jy_tiffany/resource/images/ad03.jpg'}}"/>
	</div>
</div>
</div>
<div ng-include="sys_html('common/_share','','','jy_weishop')"></div>
<div ng-include="sys_html('common/_sales','','','jy_weishop')"></div>
<link rel="stylesheet" href="../addons/jy_tiffany/resource/css/news.css?v=7" type="text/css">
<div ng-include="sys_html('_footer')"></div>
<div ng-include="sys_html('shop/_kefu')"></div>
<div ng-if="pagedata.nodatapic_close" ng-include="sys_html('common/_coupon',true)"></div>
<div ng-if="pagedata.nodatapic_close" ng-include="sys_html('common/_h5game',true)"></div>
<div ng-include="sys_html('common/_gotop',true)"></div>
<div ng-include="sys_html('common/_welcomehdp',true)"></div>
<!--弹目-->
<div ng-if="pagedata.showtanmus && !pagedata.pluginset.no_tanmu" class="video-sms-pane {{pagedata.transition?'transition':''}}">
		<div class="video-sms-text">
			<image class="video-sms-logo" ng-src="{{pagedata.tanmus[pagedata.nowmsgid].avatar}}"/>
			<span class="overflow-h"> 最新订单来自 {{pagedata.tanmus[pagedata.nowmsgid].nickname}}</span>
		</div>
</div>
<script>
scope.pagedata.issocketmsg=false;
scope.pagedata.tanmuspage=0;
scope.pagedata.isa2=true;
scope.pagedata.isno_coupontop=1;
scope.pagedata.gettanmus=function() {
	if(!scope.pagedata.issocketmsg){
			scope.pagedata.nowmsgid=0;
			scope.get('jy_weishop/get_data/gettanmus/page='+scope.pagedata.tanmuspage,function(res){
						//console.log(res);
						scope.pagedata.tanmus=res.list
						if(scope.pagedata.tanmus.length>0){
							scope.pagedata.tanmuspage++;
							scope.pagedata.up_oldtanmu();
						}
			});
	}
}
//刚进入时；如果没有新订单消息，就弹储备订单消息
if(scope.pagedata.setting.no_tanmu!=1){
		setTimeout(function(){
			scope.pagedata.gettanmus();
		},2000);
}
scope.pagedata.up_oldtanmu=function() {
		if(scope.page.action=='index'){
			var i=scope.pagedata.nowmsgid;
			if(i<scope.pagedata.tanmus.length){
				set_tanmu(scope.pagedata.tanmus[i].nickname,scope.pagedata.tanmus[i].avatar,scope.pagedata.tanmus[i].time);
			}else{
				scope.pagedata.gettanmus();
			}
		}else{
			return false;
		}
}
function set_tanmu(nickname,avatar,time) {
		scope.pagedata.nowmsgid++
		scope.pagedata.showtanmus=true
		scope.$evalAsync(scope.pagedata.showtanmus);
		setTimeout(function(){
			scope.pagedata.transition=true
			scope.$evalAsync(scope.pagedata.transition);	
		},300);
		setTimeout(function(){
			scope.pagedata.showtanmus=false
			scope.pagedata.transition=false
			scope.$evalAsync(scope.pagedata.showtanmus);	
		},2000);
		setTimeout(function(){
			//等待5秒，如果没有新的订单消息，就弹储备订单消息
			scope.pagedata.issocketmsg=scope.pagedata.issocketmsg?scope.pagedata.issocketmsg:false;
			if(!scope.pagedata.issocketmsg && scope.page.action=='index'){
				scope.pagedata.up_oldtanmu();
			}
		},4000);
}
// 百度地图API功能
if(!scope.pagedata.lat_lng || !scope.pagedata.pcd.street){
	window.scope.location(function(re){
		if(re.lat_lng){
			scope.pagedata.pcd=re.addressComponents;
			scope.pagedata.pcd.street=scope.pagedata.pcd.street_recommend?scope.pagedata.pcd.street_recommend:scope.pagedata.pcd.street;
			var query=scope.made_query(scope.pagedata.pcd);
			query+='&'+'lat='+re.lat_lng.lat+'&lng='+re.lat_lng.lng+'&city='+re.lat_lng.lng;
			scope.get('jy_weishop/store.index/getlist/islocation=1&'+query,function(res){
				scope.pagedata.selectstore = res.stores?res.stores[0]:{};
				scope.$evalAsync();
			});
		}
	},scope.pagedata.setting.no_location);
}
//手机软键盘--搜索
$("body").keydown(function() {
    if (event.keyCode == "13") {
        $('#searchsub').click();
    }
});
scope.pagedata.scancode=function () {
			console.log('scanQRCodeOK');
			wx.scanQRCode({
				needResult: 1, // 默认为0，扫描结果由微信处理，1则直接返回扫描结果，
				scanType: ["qrCode","barCode"], // 可以指定扫二维码还是一维码，默认二者都有
				success: function (res) {
					var result = res.resultStr; // 当needResult 为 1 时，扫码返回的结果
					location.href = result;
				}
			});
}
</script>
<script>
	scope.tool.get_list('jy_weishop/goods.index/getlist/num=9',true);
	scope.pagedata.scroll_bottom=function(){
		scope.tool.get_list('jy_weishop/goods.index/getlist/num=9');
	}
	scope.pagedata.getgroupgoods=function(item){
		scope.get('jy_weishop/goods.index/getlist/num=9',function(res){
			scope.pagedata.groupgoods=res
			scope.$evalAsync();
		});
	}
	scope.pagedata.getgroupgoods();
	scope.pagedata.gethot_goods=function(item){
		scope.get('jy_weishop/get_data/gethot_goods/num=9',function(res){
			scope.pagedata.hot_list=res.list
			scope.$evalAsync();
		});
	}
	scope.pagedata.gethot_goods();
</script>